<gm:page title="My App" authenticate="false">


<div style="float: right; width: 65%"> 
  <gm:map id="mainMap" lat="-27.5983688685"  lng="-48.51356506347" zoom="11" maptypes="true"
  data="${placesList}" control="large" latref="geo:lat" lngref="geo:long" infotemplate="detailTemplate">
    <gm:handleEvent src="placesList"/> 
  </gm:map>
</div>

<input type="button" value="Toggle KML" onClick="kml();"/>

<script>

function kml() 
{
  var myMap = google.mashups.getObjectById('mainMap').getMap();
  var geoXml = new GGeoXml("http://mashup-linhares-outdoor.googlecode.com/svn/trunk/kml/corrego_lagoa-img.kml");

  myMap.addOverlay(geoXml);


//  myMap.enableDoubleClickZoom();
//    var polyline = new GPolyline([ new GLatLng(-27.610600657,-48.490201),
//    new GLatLng(-27.620600657, -48.490201),  
//    new GLatLng(-27.630600657, -48.490201)], "#FF0000", 10);
//     myMap.addOverlay(polyline);
}

</script>

</gm:page>

